// 该文件是打包的入口文件
/* import the fontawesome core */
import { library } from '@fortawesome/fontawesome-svg-core'

/* import font awesome icon component */
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'

/* import fas icons */
import { fas } from '@fortawesome/free-solid-svg-icons'
library.add(fas);

// 引入样式
import "./styles/index.scss";

// 引入自定义组件
import XqIcon from "@/components/Icon/Icon.vue";
import XqButton from "@/components/Button";
import XqCard from "@/components/Card/Card.vue";

const componentsArr = [XqIcon, XqButton, XqCard];
const install = (app)=> {
    // 遍历 注册所有的组件
    componentsArr.forEach(component => {
        app.component(component.name, component);
    })
    app.component('font-awesome-icon', FontAwesomeIcon);
}

// 全部导出
export default {
    install
}

// 按需到处
export { install, XqButton, XqIcon }